<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>

<body>
	<script>
		// function sum(num) {
		// 	if (num === 1) return 10
		// 	return  sum(num - 1) * 2 +10
		// }

		function sum(num) {
			if (num === 1) return 10

			return sum(num - 1) + 2
		}


	</script>
</body>

</html>